setTimeout(function () {
  var a = 'hello'
  setTimeout(function () {
    var b = 'lagou'
    setTimeout(function () {
      var c = 'i♥u'
      console.log(a + b + c)
    }, 10);
  }, 10);
}, 10);

const promise = new Promise(function (resolve, reject) {
  setTimeout(() => {
    resolve()
  }, 30)
})

promise
  .then(() => {
    return a = 'hello'
  })
  .then(() => {
    return b = 'lagou'
  })
  .then(() => {
    var c = 'i♥u1'
    console.log(a + b + c)
  })


const promise2 = new Promise(function (resolve, reject) {
  setTimeout(() => {
    resolve()
  }, 10)
})

promise2
  .then(() => {
    return a = 'hello'
  })
  .then(() => {
    return b = 'lagou'
  })
  .then(() => {
    var c = 'i♥u2'
    console.log(a + b + c)
  })



